package com.naiterui.ehp.bs.patient.config;

import com.naiterui.ehp.bp.support.security.InterceptorAddition;
import com.naiterui.ehp.bs.patient.interceptor.LoginInterceptor;
import com.naiterui.ehp.bs.patient.interceptor.VersionInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author guoyongxiang
 */
@Configuration
public class InterceptorConfig {


    @Bean
    public InterceptorAddition apLoginInterceptor() {
        return InterceptorAddition.build(new LoginInterceptor()).addPathPatterns("/ap/**");
    }

    @Bean
    public InterceptorAddition apVersionInterceptor() {
        return InterceptorAddition.build(new VersionInterceptor()).addPathPatterns("/ap/**");
    }

}